package com.xfcy.blog.dto;

import com.xfcy.blog.entity.Menu;
import com.xfcy.blog.valid.AddGroup;
import com.xfcy.blog.valid.UpdateGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.List;

/**
 * @author 晓风残月Lx
 * @date 2023/5/27 16:38
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RoleDTO {

    @Null(message = "新增不能有id", groups = AddGroup.class)
    @NotNull(message = "修改必须有id", groups = UpdateGroup.class)
    private Integer id;

    @NotBlank(message = "角色编码不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String code;

    @NotBlank(message = "角色名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    private String remarks;

    private List<Integer> menus;



}
